﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using ShineTech.Domain.Models.Kanbans;
using ShineTech.Domain.Models.Users;

namespace ShineTech.Infrastructure.Repositories.Kanbans
{
    public class ShareEntityTypeConfiguration : IEntityTypeConfiguration<Share>
    {
        public void Configure(EntityTypeBuilder<Share> builder)
        {
            builder.ToTable("Shares");

            builder.HasKey(t => t.Id);
            builder.Property(t => t.KanbanId).HasColumnName("KanbanId").IsRequired();
            builder.Property(t => t.SendEmail).HasColumnName("SendEmail").IsRequired();
            builder.Property(t => t.SendUserId).HasColumnName("SendUserId").IsRequired();
            builder.Property(t => t.ToUserId).HasColumnName("ToUserId").IsRequired();
            builder.Property(t => t.ToEmail).HasColumnName("ToEmail").IsRequired();
            builder.Property(t => t.IsConfirm).HasColumnName("IsConfirm").IsRequired();



        }
    }
}
